﻿Public Class Form1

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        Dim fecha As Date
        fecha = Date.Now
        Me.TextBox1.Text = "Fecha analizada: " & fecha.ToString() & vbCrLf & _
            "Month : " & fecha.Month().ToString() & vbCrLf & _
            "Day : " & fecha.Day().ToString() & vbCrLf & _
            "Year : " & fecha.Year().ToString() & vbCrLf & _
            "Hour : " & fecha.Hour().ToString() & vbCrLf & _
            "Minute : " & fecha.Minute().ToString() & vbCrLf & _
            "Second : " & fecha.Second().ToString() & vbCrLf & _
            "Day of the week : " & fecha.DayOfWeek() & vbCrLf & _
            "Day of the year : " & fecha.DayOfYear().ToString() & vbCrLf & _
            "Menos un día : " & fecha.AddDays(-1).ToString() & vbCrLf
    End Sub
End Class
